<template>
  <div class="recommend">
    <div class="recommendItem" v-for="(item,index) in recommends" v-bind:key="index">
      <a :href="item.link" >
        <img :src="item.image" alt="">
        <p>{{item.title}}</p>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeRecommendView",
  props:{
    recommends:{
      type:Array,
      default:function (){
        return []
      }
    }
  },
}
</script>

<style scoped>
.recommend{
  display: flex;
  text-align: center;
  padding:10px 0;
  border-bottom: 10px solid #eee;
}
.recommendItem{
  /*让元素均等分*/
  flex: 1;

}
.recommendItem img{
  max-width: 90%;
  margin-bottom: 10px;
}
.recommendItem p{
  font-size: 12px;
}
</style>